package io.renren.modules.nuaa.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.nuaa.dao.TQuestionOptionsDao;
import io.renren.modules.nuaa.dto.TQuestionOptionsDTO;
import io.renren.modules.nuaa.entity.TQuestionOptionsEntity;
import io.renren.modules.nuaa.service.TQuestionOptionsService;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 选项
 *
 * @author whc 15953295779@126.com
 * @since 3.0 2022-05-11
 */
@Service
public class TQuestionOptionsServiceImpl extends CrudServiceImpl<TQuestionOptionsDao, TQuestionOptionsEntity, TQuestionOptionsDTO> implements TQuestionOptionsService {

    @Override
    public QueryWrapper<TQuestionOptionsEntity> getWrapper(Map<String, Object> params){
        QueryWrapper<TQuestionOptionsEntity> wrapper = new QueryWrapper<>();
        Long itemId = (Long)params.get("item_id");
        if(itemId != null){
            wrapper.eq("item_id", itemId);
        }
        return wrapper;
    }


}